package org.ands.apps;

import java.io.FileInputStream;
import java.util.Properties;

public class CleanRifCs {


	public static void main(String[] args) {
		
		if (args.length != 1){
			System.err.println("Requires path to config file");
			System.exit(0);
		}
		
		final String configFilename = args[0];
		if((configFilename == null) || (configFilename.isEmpty())){
			System.err.println("Requires valid config file");
			System.exit(0);
		}
		
		System.out.println("Reading values from "+configFilename);
		
		try {
			
			FileInputStream in = new FileInputStream(configFilename);
			
			Properties properties = new Properties();
			properties.load(in);
			in.close();
			
			PropertyHelper propertyHelper = new PropertyHelper(properties);
			assert(propertyHelper != null);
			
			ComponentManager componentManager = new ComponentManager();
			componentManager.cleanRIFCS(properties);
			
		} catch (Exception e) {
			System.err.println("Exception ["+e.getMessage()+"].");
			e.printStackTrace();
		}
	}
}